package com.lagou.boot;

import com.lagou.client.RPCConsumer;
import com.lagou.request.RpcRequest;
import com.lagou.service.IUserService;

public class ConsumerBoot {

    public static void main(String[] args) throws InterruptedException {

        //1.创建代理对象
        RPCConsumer rpcConsumer = new RPCConsumer();
        IUserService service = (IUserService) rpcConsumer.createProxy(IUserService.class);

        //2.循环给服务器写数据
        while (true){
            Thread.sleep(2000);
            String result = service.sayHello("are you ok ?");
            System.out.println(result);
        }

    }
}
